3.167 \(\int \frac{1-x^2}{(1+x+x^2)^2} \, dx\)

Optimal. Leaf size=10 \[ \frac{x}{x^2+x+1} \]

[Out]

x/(1 + x + x^2)

________________________________________________________________________________________

Rubi [A]  time = 0.0107474, antiderivative size = 10, normalized size of antiderivative = 1., number of steps used = 1, number of rules used = 1, integrand size = 16, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.062, Rules used = {1588} \[ \frac{x}{x^2+x+1} \]

Antiderivative was successfully verified.

[In]

Int[(1 - x^2)/(1 + x + x^2)^2,x]

[Out]

x/(1 + x + x^2)

Rule 1588

Int[(Pp_)*(Qq_)^(m_.), x_Symbol] :> With[{p = Expon[Pp, x], q = Expon[Qq, x]}, Simp[(Coeff[Pp, x, p]*x^(p - q
+ 1)*Qq^(m + 1))/((p + m*q + 1)*Coeff[Qq, x, q]), x] /; NeQ[p + m*q + 1, 0] && EqQ[(p + m*q + 1)*Coeff[Qq, x,
q]*Pp, Coeff[Pp, x, p]*x^(p - q)*((p - q + 1)*Qq + (m + 1)*x*D[Qq, x])]] /; FreeQ[m, x] && PolyQ[Pp, x] && Pol
yQ[Qq, x] && NeQ[m, -1]

Rubi steps

\begin{align*} \int \frac{1-x^2}{\left (1+x+x^2\right )^2} \, dx &=\frac{x}{1+x+x^2}\\ \end{align*}

Mathematica [A]  time = 0.0052611, size = 10, normalized size = 1. \[ \frac{x}{x^2+x+1} \]

Antiderivative was successfully verified.

[In]

Integrate[(1 - x^2)/(1 + x + x^2)^2,x]

[Out]

x/(1 + x + x^2)

________________________________________________________________________________________

Maple [A]  time = 0.042, size = 11, normalized size = 1.1 \begin{align*}{\frac{x}{{x}^{2}+x+1}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((-x^2+1)/(x^2+x+1)^2,x)

[Out]

x/(x^2+x+1)

________________________________________________________________________________________

Maxima [A]  time = 1.02832, size = 14, normalized size = 1.4 \begin{align*} \frac{x}{x^{2} + x + 1} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((-x^2+1)/(x^2+x+1)^2,x, algorithm="maxima")

[Out]

x/(x^2 + x + 1)

________________________________________________________________________________________

Fricas [A]  time = 1.6145, size = 23, normalized size = 2.3 \begin{align*} \frac{x}{x^{2} + x + 1} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((-x^2+1)/(x^2+x+1)^2,x, algorithm="fricas")

[Out]

x/(x^2 + x + 1)

________________________________________________________________________________________

Sympy [A]  time = 0.086572, size = 7, normalized size = 0.7 \begin{align*} \frac{x}{x^{2} + x + 1} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((-x**2+1)/(x**2+x+1)**2,x)

[Out]

x/(x**2 + x + 1)

________________________________________________________________________________________

Giac [A]  time = 1.20656, size = 11, normalized size = 1.1 \begin{align*} \frac{1}{x + \frac{1}{x} + 1} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((-x^2+1)/(x^2+x+1)^2,x, algorithm="giac")

[Out]

1/(x + 1/x + 1)